/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

/**
 *
 * @author Administrator
 */
public class HttpUtils {

    public static final WebClient client = new WebClient(BrowserVersion.FIREFOX_3_6);

    public static HtmlPage getPage(String url) {
        HtmlPage page = null;
        try {
            page = client.getPage(url);
            return page;
        } catch (Exception e) {
            System.out.println(e.getMessage());
        } finally {
            client.closeAllWindows();
        }

        return page;

    }

    public static String getusername() {
        return null;
    }
}
